Platform Explorer / Nuxeo Platform LTS 2016 8.10

Contribution org.nuxeo.dam.pageprovider--providers

This contribution is part of XML component org.nuxeo.dam.pageprovider inside nuxeo-dam-web-ui-8.10.jar /OSGI-INF/dam-page-provider-contrib.xml

Extension Point

Extension point providers of component PageProviderService.

Contributed Items

  • <genericPageProvider class="org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider" name="assets_search">
          <whereClause docType="AssetsSearch">
            <predicate operator="FULLTEXT ALL" parameter="ecm:fulltext">
              <field name="ecm_fulltext" schema="assets_search"/>
            </predicate>
            <fixedPart>ecm:mixinType IN ('Picture', 'Audio', 'Video') AND ecm:isCheckedInVersion = 0 AND
              ecm:currentLifeCycleState != 'deleted' AND ecm:isProxy=0
            </fixedPart>
          </whereClause>
          <aggregates>
            <aggregate id="system_primaryType_agg" parameter="ecm:primaryType" type="terms">
              <field name="system_primaryType_agg" schema="assets_search"/>
            </aggregate>
            <aggregate id="system_mimetype_agg" parameter="file:content/mime-type" type="terms">
              <field name="system_mimetype_agg" schema="assets_search"/>
            </aggregate>
            <aggregate id="asset_width_agg" parameter="picture:info/width" type="range">
              <field name="asset_width_agg" schema="assets_search"/>
              <ranges>
                <range key="to_500_px" to="500.0"/>
                <range from="500.0" key="from_500_to_1500_px" to="1500.0"/>
                <range from="1500.0" key="from_1500_to_2000_px" to="2000.0"/>
                <range from="2000.0" key="from_2000_px"/>
              </ranges>
            </aggregate>
            <aggregate id="asset_height_agg" parameter="picture:info/height" type="range">
              <field name="asset_height_agg" schema="assets_search"/>
              <ranges>
                <range key="to_500_px" to="500.0"/>
                <range from="500.0" key="from_500_to_1500_px" to="1500.0"/>
                <range from="1500.0" key="from_1500_to_2000_px" to="2000.0"/>
                <range from="2000.0" key="from_2000_px"/>
              </ranges>
            </aggregate>
            <aggregate id="color_profile_agg" parameter="picture:info/colorSpace" type="terms">
              <field name="color_profile_agg" schema="assets_search"/>
            </aggregate>
            <aggregate id="color_depth_agg" parameter="picture:info/depth" type="terms">
              <field name="color_depth_agg" schema="assets_search"/>
            </aggregate>
            <aggregate id="video_duration_agg" parameter="vid:info/duration" type="range">
              <field name="video_duration_agg" schema="assets_search"/>
              <ranges>
                <range key="to_30_s" to="30.0"/>
                <range from="30.0" key="from_30_to_180_s" to="180.0"/>
                <range from="180.0" key="from_180_to_600_s" to="600.0"/>
                <range from="600.0" key="from_600_to_1800_s" to="1800.0"/>
                <range from="1800.0" key="from_1800_s"/>
              </ranges>
            </aggregate>
          </aggregates>
          <pageSize>20</pageSize>
        </genericPageProvider>

XML Source

<extension point="providers" target="org.nuxeo.ecm.platform.query.api.PageProviderService">

    <genericPageProvider class="org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider" name="assets_search">
      <whereClause docType="AssetsSearch">
        <predicate operator="FULLTEXT ALL" parameter="ecm:fulltext">
          <field name="ecm_fulltext" schema="assets_search"/>
        </predicate>
        <fixedPart>ecm:mixinType IN ('Picture', 'Audio', 'Video') AND ecm:isCheckedInVersion = 0 AND
          ecm:currentLifeCycleState != 'deleted' AND ecm:isProxy=0
        </fixedPart>
      </whereClause>
      <aggregates>
        <aggregate id="system_primaryType_agg" parameter="ecm:primaryType" type="terms">
          <field name="system_primaryType_agg" schema="assets_search"/>
        </aggregate>
        <aggregate id="system_mimetype_agg" parameter="file:content/mime-type" type="terms">
          <field name="system_mimetype_agg" schema="assets_search"/>
        </aggregate>
        <aggregate id="asset_width_agg" parameter="picture:info/width" type="range">
          <field name="asset_width_agg" schema="assets_search"/>
          <ranges>
            <range key="to_500_px" to="500.0"/>
            <range from="500.0" key="from_500_to_1500_px" to="1500.0"/>
            <range from="1500.0" key="from_1500_to_2000_px" to="2000.0"/>
            <range from="2000.0" key="from_2000_px"/>
          </ranges>
        </aggregate>
        <aggregate id="asset_height_agg" parameter="picture:info/height" type="range">
          <field name="asset_height_agg" schema="assets_search"/>
          <ranges>
            <range key="to_500_px" to="500.0"/>
            <range from="500.0" key="from_500_to_1500_px" to="1500.0"/>
            <range from="1500.0" key="from_1500_to_2000_px" to="2000.0"/>
            <range from="2000.0" key="from_2000_px"/>
          </ranges>
        </aggregate>
        <aggregate id="color_profile_agg" parameter="picture:info/colorSpace" type="terms">
          <field name="color_profile_agg" schema="assets_search"/>
        </aggregate>
        <aggregate id="color_depth_agg" parameter="picture:info/depth" type="terms">
          <field name="color_depth_agg" schema="assets_search"/>
        </aggregate>
        <aggregate id="video_duration_agg" parameter="vid:info/duration" type="range">
          <field name="video_duration_agg" schema="assets_search"/>
          <ranges>
            <range key="to_30_s" to="30.0"/>
            <range from="30.0" key="from_30_to_180_s" to="180.0"/>
            <range from="180.0" key="from_180_to_600_s" to="600.0"/>
            <range from="600.0" key="from_600_to_1800_s" to="1800.0"/>
            <range from="1800.0" key="from_1800_s"/>
          </ranges>
        </aggregate>
      </aggregates>
      <pageSize>20</pageSize>
    </genericPageProvider>

  </extension>